<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<title>商品选择器测试和演示页面</title>

<script type="text/javascript">
function myCallback(product){
	var returnString = "[Success]\r\n";
	returnString += "productId:"+product.productId+",";
	returnString += "productName:"+product.productName+",";
	returnString += "productCode:"+product.productCode+",";
	returnString += "imageUrl:"+product.imageUrl+",";
	returnString += "productKind:"+product.productKind;
	alert(returnString);
}
function myCallback2(products){
	var returnString = "[Success]\r\n";
	for(var i=0; i<products.length; i++){
		var product = products[i];
		returnString +=i+":";
		returnString += "productId:"+product.productId+",";
		returnString += "productName:"+product.productName+",";
		returnString += "productCode:"+product.productCode+"\r\n";
	}	
	alert(returnString);
}
</script>

<input value="单个商品选择器" onclick="showDialogOfselector1()" type="button"/>
<product:productSelector selectorId="selector1" callbackFunc="myCallback"/>

<input value="多个商品选择器" onclick="showDialogOfselector2()" type="button"/>
<product:productSelector selectorId="selector2" callbackFunc="myCallback2" multiple="true"/>

